/*** 彩讯 apph5 sdk */
var Webapph5 = {
    //_apiURL: "https://wx.zone139.com/2016tyjf_dev/qypt9606/openApi/behaviorlog/pushtrack.do",
    _apiURL:"https://gd.10086.cn/apph5/openapi/behaviorlog/pushtrack.do",
    _mobile: '',
    _linkurl: window.location.href,
    init: function (args) {
        Webapph5._mobile = args['mobile'] || sessionStorage.getItem('_mobile') || $("#WTmobile").val() || '';
        if (Webapph5._mobile != '') {
            if ($("#WTmobile").val() == undefined || $("#WTmobile").val() == null) {
                var meta = document.createElement('meta');
                meta.name = 'WT.mobile';
                meta.content = Webapph5._mobile;
                document.getElementsByTagName('head')[0].appendChild(meta);
            } else {
                $("#WTmobile").val(Webapph5._mobile);
            }
            sessionStorage.setItem('_mobile', Webapph5._mobile);
        }
    },
    pushTrack: function (args) {
        //上报广东H5
        //上报自有接口
        push(args);
        function push(args) {
            $.ajax({
                url: Webapph5._apiURL,
                type: 'post',
                contentType: "application/json",
                dataType: 'json',
                data: JSON.stringify({
                    'mobile': Webapph5._mobile || "0",
                    'linkurl': Webapph5._linkurl,
                    'eventid': args['eventid'],
                    'eventmsg': args['eventmsg']
                })
            })
        }
    }
};
Webapph5.pushTrack({'eventmsg': 'init', 'eventid': '0'});
